package com.mxf.code.proxy.static_proxy;

import org.springframework.stereotype.Service;

/**
 * Copyright (C), 2017-2022, mxf
 * Author: 28382
 * Date: 2022/10/13 18:11
 * FileName: ProxyRealSubject
 * Description: 继承代理
 */
@Service
public class ProxyRealSubject extends RealSubject{
    @Override
    public void doSomething() {
        long startTime = System.currentTimeMillis();
        RealSubject realSubject = new RealSubject();
        // 登录逻辑
        realSubject.doSomething();
        long endTime = System.currentTimeMillis();
        long responseTime = endTime - startTime;
        System.out.println("接口响应时间："+responseTime);
    }
}
